<?php
defined('IN_MAIN') or exit('Invalid Access!');

function get_settings($param=""){
 global $vars;
 $db=$vars["db"];
 if($param==""){
  $param_q="1=1";
 }else{
  $param_q=format_search_field('param', $param);
 }
 $t=@mysql_num_rows($r=mysql_query("select * from $db->settings where $param_q"));
 for($i=0;$i<$t;$i++){
  $setting=mysql_fetch_assoc($r);
  $settings[$setting['param']]=$setting['value'];
 }
 return $settings;
}
?>